﻿using Domain.Entity.bs;
using Domain.Entity.sys;
using Domain.Entity.zct;
using Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domain.IRepository
{
    public interface ICustomerRepository
    {
        //高级查询
        Task<FenYe<Customer>> GetSeniorCustomer(FenYe<Customer> fenYe, string? cust_code, string? cust_name, string? cust_industry, string? cust_type, string? cust_linkman, string? cust_linkphone, string? cust_email, string? cust_depName, string? cust_userName, int? cust_status, string? cust_address, string? cust_accountName, string? cust_taxpayerNum, string? cust_bankAccount, string? cust_openBank, string? create_name, string? startTime, string? endTime);

        //查询
        Task<FenYe<Customer>> GetCustomer(FenYe<Customer> fenYe, string? cust_code, string? cust_name, int? cust_status, string? cust_industry, string? cust_userName);

        // 添加客户
        Task<int> AddCustomer(Customer Customer);

        // 删除客户
        Task<int> DeleteCustomer(int id);

        // 修改客户
        Task<int> UpdateCustomer(Customer Customer);

        //切换状态
        Task<int> UpdateStatus(int id, int cust_status);

        /// <summary>
        /// 查询部门
        /// </summary>
        /// <returns>
        /// 默认查询全部状态为启用删除标识为0的数据，如果有Department_id参数存在就查询使用Department_id字段数据和Department_id参数相等的数据
        /// </returns>
        Task<List<Department>> GetDepartment(int? Department_id);

        /// <summary>
        /// 查询用户
        /// </summary>
        /// <returns>
        /// 默认查询全部状态为启用删除标识为0的数据，如果有Department_id参数存在就查询使用Department_id字段数据和Department_id参数相等的数据
        /// </returns>
        Task<List<User>> GetUser(int? Department_id);

        /// <summary>
        /// 查询字典
        /// </summary>
        /// <returns>
        /// 查询状态为启用，且类型编号正确的数据字典
        /// </returns>
        Task<List<DictData>> GetDictData(int dict_id);

        /// <summary>
        /// 使用Id查询客户
        /// </summary>
        Task<Customer> GetIdCustomer(int id);


        /// <summary>
        /// 查询所有客户编号
        /// </summary>
        Task<List<string>> GetCustomerID();

        //查询所有客户
        Task<List<Customer>> GetCustomers();
    }
}
